<?php
namespace app\erp_meixingtiyu\logic;

use app\erp_meixingtiyu\model\Referee as RefereeModel;

class Referee
{
    public function getList()
    {
      $list = RefereeModel::getList();
      return $list->toArray();
    }

    public function addReferee($data)
    {
      RefereeModel::createReferee($data);
    }

    public function editReferee($data)
    {
      RefereeModel::editReferee($data);
    }

    public function deleteReferee($refereeId)
    {
      RefereeModel::destoryReferee($refereeId);
    }

    public function getFreeReferees()
    {
      $list = RefereeModel::selectFreeReferees();
      return $list->toArray();
    }
}
